package cn.wolfcode.productServer.service.impl;

import cn.wolfcode.productServer.domain.Product;
import cn.wolfcode.productServer.repository.ProductRepository;
import cn.wolfcode.productServer.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName ProductServiceImpl
 * @Author VCR
 * @Date 2021/12/21 13:29
 * @Version 1.0
 */
@Service
public class ProductServiceImpl implements IProductService {

    @Autowired
    private ProductRepository productRepository;

    @Override
    public Product get(Long id) {
        return productRepository.findById(id).get();
    }
}
